Following cde fails: "%WinDir%\system32\certutil.exe" -f -csp "Microsoft Strong Cryptographic Provider" -repairstore my "%serialn%" MyFedlet.inf
Experts,
I wrote the following batch file to change the friendly name of a certificate on Windows XP professional already visible from the mmc
echo [Version] > mf.inf
echo Signature = "$Windows NT$">> mf.inf
echo [Properties]>> mf.inf
echo 11 = {text}fedlet>> mf.inf
rem get the certificate serial number
"%WinDir%\system32\certutil.exe" -dump mf.cer | "%WinDir%\system32\find.exe" "Cert Hash(sha1):" >s.tmp
set /p serial=<s.tmp
del /F s.tmp
set serialn=%serial:*Cert Hash(sha1): =%
echo Certificate Serial number = [%serialn%]
rem repair the certificate with the given friendlyname
"%WinDir%\system32\certutil.exe" -f -csp "Microsoft Strong Cryptographic Provider" -repairstore my "%serialn%" mf.inf
These lines works perfectly on Windows 7, but fails with the following error on XP:
402.203.0: 0x80070057 (WIN32: 87): ..CertCli Version
Expected no more than 2 args, received 3
CertUtil: Too many arguments
When I remove the latest parameter certutil hang...
Note that I'm using certutil from:
http://www.microsoft.com/downloads/details.aspx?FamilyID=e487f885-f0c7-436a-a392-25793a25bad7&DisplayLang=en
(http://www.microsoft.com/downloads/details.aspx?FamilyID=e487f885-f0c7-436a-a392-25793a25bad7&DisplayLang=en)
Could you please let me know where is the issue?
Assuming certutil from my windows 7 will not execute on XP, frm where shall I get certutil.exe for XP that supports -repairstore with 3 parameters?
Thanks in advance.
Best Regards.
June 23rd, 2010 8:17pm